package com.leozhang.app;

import com.spire.xls.*;

public class ReadExcel {
    public static void main(String[] args) {
        // 加载 Excel 文件
        Workbook workbook = new Workbook();
        workbook.loadFromFile("Example.xlsx");

        // 获取第一个工作表
        Worksheet sheet = workbook.getWorksheets().get(0);

        // 读取单元格数据
        String value = sheet.getCellRange("A1").getText();
        System.out.println("A1 单元格内容：" + value);
    }
}
